boot252.lst

MPASM 03.20 Released BOOT252.ASM 9-26-2002 20:47:19 PAGE 1 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00001 ;*********************************************************** 00002 ; boot252.asm 00003 ; A disassembly of the code found in a new PIC18F252. 00004 ; 00005 ; Bootloader for PIC18F by Ross Fosler 00006 ; 01/03/2002 ... First full implementation 00007 ; 07/03/2002 Changed entry method to use last byte of EEDATA. 00008 ; Also removed all possible infinite loops with clrwdt. 00009 ; 07/03/2002 Added code for direct boot entry, i.e. boot vector. 00010 ; 09/03/2002 Changed the general packet format, removed the LEN field 00011 ; 09/03/2002 Modified the erase command to do multiple row erase. 00012 ; 12/03/2002 Fixed write problem to CONFIG area. Write was offset by a byte. 00013 ; 15/03/2002 Added work around for 18F8720 tblwt*+ problem. 00014 ; 20/03/2002 Modified receive & parse engine to vector to autobaud on a checksum 00015 ; error since a chechsum error could likely be a communications problem. 00016 ; 22/03/2002 Removed clrwdt from the startup. This instruction affects the TO and 00017 ; PD flags. Removing this instruction should have no affect on code 00018 ; operation since the WDT is cleared on a reset and boot entry is always 00019 ; on a reset. 00020 ; 22/03/2002 Modified the protocol to incorporate the autobaud as part of the 00021 ; first received . Doing this improves robustness by allowing 00022 ; re-sync under any condition. Previously it was possible to enter a 00023 ; state where only a hard reset would allow re-syncing. 00024 ; 00025 ; Modifications by Alan Judson 00026 ; 21/09/2002 Read a PIC18F252 with a PICSTART Plus development programmer and 00027 ; Disassembled Code Generated by MPLAB. 00028 ; 22/09/2002 Added comments from Application Note, "A FLASH Bootloader for PIC16 00029 ; and PIC18 Devices" AN851, by Ross M. Fosler and Rodger Richey. 00030 ; 00031 ; Memory Map 00032 ; ----------------- 00033 ; | 0x0000 | 00034 ; | 0x0002 | Boot vector 00035 ; | 0x0004 | Unlock & write vector 00036 ; | | 00037 ; | Boot Block | (this program) 00038 ; | | 00039 ; | 0x0200 | Re-mapped Reset Vector 00040 ; | 0x0208 | Re-mapped High Priority Interrupt Vector 00041 ; | 0x0218 | Re-mapped Low Priority Interrupt Vector 00042 ; | | | 00043 ; | | 00044 ; | | 00045 ; | Code Space | User Program space 00046 ; | | 00047 ; | | | 00048 ; | | 00049 ; | 0xXXXXXX | 00050 ; ----------------- 00051 ; 00052 ; Incoming data format: 00053 ;
start next

Copyright © 2002 Alan Judson. All Rights Reserved.
Serial Port Bootloader PIC18F252 Programming Issue 1, 28 September 2002
p18f252a.html Draft Page 1 of 9